﻿using System.Workflow.ComponentModel.Design;
using System.Workflow.ComponentModel;
using System.ComponentModel;
using OpenComposite.Workflow;
using OpenComposite.Workflow.Interfaces;
using System;
using System.Drawing;

namespace OpenComposite.Workflow
{
    [Designer(typeof(ColumnMapperDesigner)), ToolboxItem(typeof(ColumnMapperToolboxItem))]
    public class ColumnMapperActivity : DataAggregatorActivity
    {
		//#region ILogicalActivity Members

		//[Browsable(false)]
		//public static DependencyProperty ActivitiesClassProperty = DependencyProperty.Register(
		//    "ActivitiesClass", typeof(object), typeof(ColumnMapperActivity), new PropertyMetadata(null));
		//public object ActivitiesClass
		//{
		//    get { return base.GetValue(ColumnMapperActivity.ActivitiesClassProperty); }
		//    set { base.SetValue(ColumnMapperActivity.ActivitiesClassProperty, value); }
		//}

		//[Browsable(false)]
		//public static DependencyProperty LogicalActivityIdProperty = DependencyProperty.Register(
		//"LogicalActivityId", typeof(int), typeof(ColumnMapperActivity), new PropertyMetadata(null));
		//public int LogicalActivityId
		//{
		//    get { return (int)base.GetValue(ColumnMapperActivity.LogicalActivityIdProperty); }
		//    set { base.SetValue(ColumnMapperActivity.LogicalActivityIdProperty, value); }
		//}

		//[Browsable(false)]
		//public static DependencyProperty LogicalActivityNameProperty = DependencyProperty.Register(
		//"LogicalActivityName", typeof(string), typeof(ColumnMapperActivity), new PropertyMetadata(null));
		//public string LogicalActivityName
		//{
		//    get { return (string)base.GetValue(ColumnMapperActivity.LogicalActivityNameProperty); }
		//    set { base.SetValue(ColumnMapperActivity.LogicalActivityNameProperty, value); }
		//}

		//#endregion

		//#region ITextActivity Members

		//public static DependencyProperty TextProperty = DependencyProperty.Register(
		// "Text", typeof(string), typeof(ColumnMapperActivity), new PropertyMetadata(null));
		//public string Text
		//{
		//    get { return (string)base.GetValue(ColumnMapperActivity.TextProperty); }
		//    set { base.SetValue(ColumnMapperActivity.TextProperty, value); }
		//}

		//#endregion
    }

    [ActivityDesignerTheme(typeof(ColumnMapperDesignerTheme))]
    public class ColumnMapperDesigner : ExtendedActivityDesigner
    {
    }

    [Serializable]
    public class ColumnMapperToolboxItem : ActivityToolboxItem
    {
        public ColumnMapperToolboxItem(Type type)
            : base(type)
        {
            base.DisplayName = "Column Mapping Activity";
        }

        public override void Initialize(Type type)
        {
            base.Initialize(type);
        }

    }

    public class ColumnMapperDesignerTheme : ActivityDesignerTheme
    {
        public ColumnMapperDesignerTheme(WorkflowTheme theme)
            : base(theme)
        {
            this.BackColorStart = Color.BurlyWood;
            this.BackColorEnd = Color.Chocolate;
            this.BorderColor = Color.Brown;
            this.ForeColor = Color.Black;
            this.BackgroundStyle = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
        }
    }
}